@extends('admin.layout.main')
@section("content")
    <form class="layui-form" action="/admin/leads" method="post">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend>线索新增</legend>
        </fieldset>
        <div class="layui-form-item">
            <label class="layui-form-label">来源：</label>
            <div class="layui-input-block">
                <select name="source" lay-filter="source">
                    <option value="0" selected="">网络营销</option>
                    <option value="1" >公开媒体</option>
                    <option value="2">合作伙伴</option>
                    <option value="3">朋友介绍</option>
                    <option value="4">广告</option>
                    <option value="5">推销电话</option>
                    <option value="6">其他</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">联系人姓名</label>
            <div class="layui-input-block">
                <input type="text" name="name" lay-verify="required" autocomplete="off" placeholder="请输入标题" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">公司名</label>
            <div class="layui-input-block">
                <input type="text" name="company_name" lay-verify="required" autocomplete="off" placeholder="请输入标题" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">行业</label>
            <div class="layui-input-block">
                <input type="text" name="industry" lay-verify="required" autocomplete="off" placeholder="请输入标题" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">职位</label>
            <div class="layui-input-block">
                <input type="text" name="position" lay-verify="required" autocomplete="off" placeholder="请输入标题" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">尊称</label>
            <div class="layui-input-block">
                <input type="radio" name="gender" value="先生" title="先生" checked="">
                <input type="radio" name="gender" value="女士" title="女士">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">验证手机</label>
                <div class="layui-input-inline">
                    <input type="tel" name="phone" lay-verify="required|phone" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">验证邮箱</label>
                <div class="layui-input-inline">
                    <input type="text" name="email" lay-verify="email" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">企业地址</label>
            <div id="city">
                <div class="layui-input-inline">
                    <select name="prov" class="prov"></select>
                </div>
                <div class="layui-input-inline">
                    <select name="city" class="city" disabled="disabled"></select>
                </div>
                <div class="layui-input-inline">
                    <select name="dist" class="dist" disabled="disabled"></select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">下次联系时间</label>
            <div class="layui-input-inline">
                <input type="text" name="next_time" id="date" lay-verify="datetime" placeholder="yyyy-MM-dd HH:mm:ss" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" name="remark" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">分配用户</label>
                <div class="layui-input-inline">
                    <select name="user_id">
                        <option value="">请选择问题</option>
                        <optgroup label="管理员">
                            <option value="test1">test1</option>
                        </optgroup>
                        <optgroup label="员工">
                            @foreach($users as $user)
                                <option value="{{$user->id}}">{{$user->name}}</option>
                            @endforeach
                        </optgroup>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>

    <script type="text/javascript">
        $(document).ready(function() {
                $("#city").citySelect({
                        prov: "陕西",
                        city: "西安",
                        dist: "雁塔区",
                        nodata: "none"
                });
        });
    </script>


@endsection
